<div class="nav">
    <a href="{:U('index')}">类别列表</a>
    <a class="sel" href="{:U('add')}">添加类别</a>
</div>
<div class="add">
    <form method="post" action="" >
        <table class="table_add">
            <tr>
                <td width="150px">所属类别</td>
                <td><select name="parent_id" id="parent_id" class="sel1">
                        <option value="0">顶级类别</option>
                        <foreach name="parentList" item="item">
                            <option value="{$item.cat_id}" >{$item.cat_name}</option>
                        </foreach>
                    </select>
                </td>
            </tr>
            <tr>
                <td width="150px">类别名称</td>
                <td><input class="input1" type="text" name="cat_name" id="cat_name" value="" style="width:140px" /> </td>
            </tr>
            <tr class="tr_module" id="tr_module_1" style="display:none">
                <td width="150px">跳转地址</td>
                <td><input class="input1" type="text" name="url" id="url" value="" style="width:500px" /> </td>
            </tr>
            <tr class="tr_ico">
                <td>大类小图标</td>
                <td>
                <include file="Public/uploadfile" filetype="image" id="ico"  value="" editvalue="{}" width="100" path="cat" limit="1" thumbw="" thumbh="" msg="75px*75px"/>
                
                </td>
            </tr>
              <tr>
                <td>手机第三级类图片</td>
                <td>
                <include file="Public/uploadfile" filetype="image" id="picture"  value="" editvalue="{}" width="100" path="cat" limit="1" thumbw="220" thumbh="220" msg="220px*220px"/>
                
                </td>
            </tr>
            
            <tr>
                <td width="150px">顺序编号</td>
                <td><input class="input1" type="text" name="order_id" id="order_id" value="1000" style="width:60px" /> <label class="msg">*</label></td>
            </tr>
            <tr>
                <td width="150px">是否显示</td>
                <td><select name="is_enable" id="is_enable" class="sel1">
                        <option value="1">显示</option>
                        <option value="0">不显示</option>
                    </select>
                </td>
            </tr>
            <tr>
                <td width="150px">导航显示</td>
                <td><select name="is_menu" id="is_menu" class="sel1">
                        <option value="0">不显示</option>
                        <option value="1">显示</option>
                    </select>
                </td>
            </tr>
            <tr>
                <td width="150px">页面标题</td>
                <td><input class="input1" type="text" name="seo_title" id="seo_title" value="" style="width:500px" /></td>
            </tr>
            <tr>
                <td width="150px">页面关键词</td>
                <td><input class="input1" type="text" name="seo_keywords" id="seo_keywords" value="" style="width:500px" /></td>
            </tr>
            <tr>
                <td width="150px">页面描述</td>
                <td><textarea class="textarea1" name="seo_description" id="seo_description" style="width:500px;height:80px;"   ></textarea></td>
            </tr>
            <tr>
                <td></td>
                <td><input type="submit" class="btn1" value="提 交" /> &nbsp; <input class="btn4" type="reset" value="重 置" /> &nbsp; <input class="btn3"  type="button" onclick="window.history.back()" value="返 回" /></td>
            </tr>
        </table>
    </form>
</div>
<script type="text/javascript">
    $(function () {
        $("#parent_id").change(function(){
            var parent_id = $("#parent_id").val();
            if(parent_id == 0) {
                $(".tr_ico").show();
            } else {
                $(".tr_ico").show();
            }
        });
    })
    $("#parent_id").val("{$parent_id}");
</script>